package com.cesgroup.zw.spring.boot.library.echarts.radar.simple;

import com.cesgroup.zw.spring.boot.echarts.build.EChartsOption;
import com.cesgroup.zw.spring.boot.echarts.component.Legend;
import com.cesgroup.zw.spring.boot.echarts.component.Title;
import com.cesgroup.zw.spring.boot.echarts.component.Tooltip;
import com.cesgroup.zw.spring.boot.echarts.component.polar.Radar;
import com.cesgroup.zw.spring.boot.echarts.enums.Align;

/**
 * <p>描述: 简单雷达图</p>
 * @author ytj
 * @date 2019/7/1 15:36
 */
@SuppressWarnings("serial")
public class SimpleRadarOption extends EChartsOption{
    public SimpleRadarOption(SimpleRadarParam simpleRadarParam){
        this.setTitle(new Title(){{
            this.setText(simpleRadarParam.getTitle());
            this.setLeft(Align.left);
        }});
        this.setRadar(new Radar(){{
            this.setIndicator(simpleRadarParam.getList());
        }});
        this.setTooltip(new Tooltip());

        this.setLegend(new Legend(){{
            this.setLeft(Align.center);
        }});
    }
}
